home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / S-Sh / ScrollControl.cpt / ScrollControl XCMD / card_6066.txt < prev    next >
Text File  |  1989-04-22  |  1KB  |  23 lines

  1. -- card: 6066 from stack: in
  2. -- bmap block id: 8875
  3. -- flags: 0000
  4. -- background id: 3516
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 1
  9. ----- text -----
  10.  
  11. As the user adjusts the control, ScrollControl is constantly sending the current value of the control in a variable called ‚ÄúcurCtlValue‚Äù. You can use this variable to adjust whatever the control is meant to manipulate. In addition, you can also use this variable to set initial control setting after the control has been used. Here is an example:
  12. on openCard
  13.   global curCtlValue¬†¬†¬†--since it‚Äôs being set across handlers, it needs to be global
  14.   put 2 into curCtlValue--this sets it to 2 when the card opens, ignoring what user set it to previously
  15. end openCard
  16. on mouseEnter
  17.   global curCtlValue¬†--besides the above reason, resetting initially doesn‚Äôt work unless it‚Äôs global
  18.   ScrollControl "0","10",curCtlValue¬†--scrollbar is set to whatever is in curCtlValue at the time
  19.   put curCtlValue into adjustSomething¬†--use new setting to adjust some value
  20. end mouseEnter
  21.  
  22.  
  23.